package compile;

/**
 * @author SongJun
 * @description 方法声明
 * @date 2021/9/28 15:30
 */
public class FunctionDecl extends Statement {
    private String name;
    private FunctionBody body;

    public FunctionDecl(String name, FunctionBody body) {
        this.name = name;
        this.body = body;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public FunctionBody getBody() {
        return body;
    }

    public void setBody(FunctionBody body) {
        this.body = body;
    }

    @Override
    public void dump(String prefix) {
        System.out.println(prefix+"FunctionDecl "+this.name);
        this.body.dump(prefix+"\t");
    }
}
